//#include <QDebug>
#include "expense.h"

Expense::Expense(QObject *parent)
    : QObject(parent)
{
}

Expense::Expense(const QString &descr, const QString &amnt, QObject *parent)
    : QObject(parent), m_descr(descr), m_amnt(amnt)
{
}

QString Expense::descr() const
{
    return m_descr;
}

void Expense::setDescr(const QString &descr)
{
    if (descr != m_descr) {
        m_descr = descr;
        //qDebug() << "Description Change:" << descr;
        emit descrChanged();
    }
}

QString Expense::amnt() const
{
    return m_amnt;
}

void Expense::setAmnt(const QString &amnt)
{
    if (amnt != m_amnt) {
        m_amnt = amnt;
        //qDebug() << "Amount Change:" << amnt;
        emit amntChanged();
    }
}

QString Expense::crncy() const
{
    return m_crncy;
}

void Expense::setCrncy(const QString &crncy)
{
    if (crncy != m_crncy) {
        m_crncy = crncy;
        //qDebug() << "Curreny Change:" << crncy;
        emit crncyChanged();
    }
}

QString Expense::payer() const
{
    return m_payer;
}

void Expense::setPayer(const QString &payer)
{
    if (payer != m_payer) {
        m_payer = payer;
        //qDebug() << "Payer Change:" << payer;
        emit payerChanged();
    }
}

QString Expense::date() const
{
    return m_date;
}

void Expense::setDate(const QString &date)
{
    if (date != m_date) {
        m_date = date;
        //qDebug() << "Date Change:" << date;
        emit dateChanged();
    }
}

QString Expense::time() const
{
    return m_time;
}

void Expense::setTime(const QString &time)
{
    if (time != m_time) {
        m_time = time;
        //qDebug() << "Time Change:" << time;
        emit timeChanged();
    }
}

QString Expense::split() const
{
    return m_split;
}

void Expense::setSplit(const QString &split)
{
    if (split != m_split) {
        m_split = split;
        //qDebug() << "Split Change:" << split;
        emit splitChanged();
    }
}

